/*
 * @Author: your name
 * @Date: 2021-10-05 21:25:43
 * @LastEditTime: 2021-10-06 15:39:06
 * @LastEditors: Please set LastEditors
 * @Description: 反调试防止用户盗取信息 侵犯版权
 * @FilePath: \bigdate\src\hooks\useDebug.ts
 */
export const nodebug = () => {
    function block() {
        if (
            window.outerHeight - window.innerHeight > 200
            || window.outerWidth - window.innerWidth > 200
        ) {
            document.body.innerHTML = '检测到非法调试,请关闭控制台后刷新重试!'
        }
        window.onresize = () => {
            if (
                window.outerHeight - window.innerHeight > 200
                || window.outerWidth - window.innerWidth > 200
            ) {
                document.body.innerHTML = '检测到非法调试,请关闭控制台后刷新重试!'
            }
        }
        // 无线Debug 
        setInterval(() => {
            (function () {
                return false
            }
            
            .constructor('debugger')
            .call())
        }, 50)
    }
    try {
        block()
    } catch (err) {}
}
